home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Aug 90 / MacApp.Tech$ 8⁄31⁄90 / 1835-Re(n) Multiple inher-Aug90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.6 KB  |  35 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  NASSI        to HARTLEY.AK
  2.  
  3. Item forwarded  by  SCHMUCKER1   to NASSI
  4.  
  5. Item    1956037                         27-Aug-90        09:49PDT
  6.  
  7. From:   RANSON                          France - Dev, Ranson Lannion,IDV
  8.  
  9. To:     MACAPP.TECH$                    MacApp Technical
  10.  
  11. Sub:    Re(n) Multiple inheritance
  12.  
  13. James, Larry, Cliff, Geoff, ...
  14.  
  15. My experience is that multiple inheritance really shines when you have a class
  16. hierarchy that you don't control (either you bought it as a compiled library,
  17. or the users of YOUR library will write it sometime in the future), and your
  18. want to build a parallel hierarchy with slightly different behaviour.
  19. Example 1: Imagine that MacApp views didn't have borders. You could write a
  20. small class whose only purpose is to draw borders. A class derived from it and
  21. any view class would be a view with borders.
  22. Example 2: Tracing the behaviour of an objet. To trace the do/undo/redo
  23. messages in commands, you could write a class that prints information on each
  24. of these messages, and "mix" it with any command class to obtain a traced
  25. command class.
  26. Unfortunately, there are very few languages in which this works easily. I am
  27. using CLOS (Common Lisp Object System), which allows me to specify how the
  28. classes will mix, and to define INCOMPLETE classes, that can only works when
  29. combined with another class by multiple inheritance. In C++ or Eiffel, the way
  30. inherited methods are called is defined ONLY by the descendant, and all member
  31. (feature) references must be resolved at compile-time.
  32. How about a MacApp in CLOS?
  33.      Daniel Ranson.
  34.  
  35.